﻿@using Microsoft.AspNetCore.Mvc.Localization
@model Idsrv4.Admin.BusinessLogic.Dtos.Configuration.ClientDto
@inject IViewLocalizer Localizer

<div class="row">
    <div class="col-md-12">
        <h3>@Localizer["Title"]</h3>
        <nav>
            <div class="nav nav-tabs mt-3" id="nav-tab" role="tablist">
                <a class="nav-item nav-link active" id="nav-name-tab" data-toggle="tab" href="#nav-name" role="tab" aria-controls="nav-name" aria-selected="true">@Localizer["NavName"]</a>
                @if (Model.Id != 0)
                {
                    <a class="nav-item nav-link" id="nav-basics-tab" data-toggle="tab" href="#nav-basics" role="tab" aria-controls="nav-basics" aria-selected="false">@Localizer["NavBasics"]</a>
                    <a class="nav-item nav-link" id="nav-authentication-tab" data-toggle="tab" href="#nav-authentication" role="tab" aria-controls="nav-authentication" aria-selected="false">@Localizer["NavAuthentication"]</a>
                    <a class="nav-item nav-link" id="nav-token-tab" data-toggle="tab" href="#nav-token" role="tab" aria-controls="nav-token" aria-selected="false">@Localizer["NavToken"]</a>
                    <a class="nav-item nav-link" id="nav-consent-tab" data-toggle="tab" href="#nav-consent" role="tab" aria-controls="nav-consent" aria-selected="false">@Localizer["NavConsent"]</a>
                    <a class="nav-item nav-link" id="nav-deviceflow-tab" data-toggle="tab" href="#nav-deviceflow" role="tab" aria-controls="nav-deviceflow" aria-selected="false">@Localizer["NavDeviceFlow"]</a>
                }
            </div>
        </nav>
        <div class="tab-content" id="nav-tabContent">
            <div class="tab-pane show active" id="nav-name" role="tabpanel" aria-labelledby="nav-name-tab">
                @await Html.PartialAsync("Client/Section/Name")
            </div>

            @if (Model.Id != 0)
            {
                <div class="tab-pane" id="nav-basics" role="tabpanel" aria-labelledby="nav-basics-tab">
                    @await Html.PartialAsync("Client/Section/Basics")
                </div>

                <div class="tab-pane" id="nav-authentication" role="tabpanel" aria-labelledby="nav-authentication-tab">
                    @await Html.PartialAsync("Client/Section/Authentication")
                </div>
                <div class="tab-pane" id="nav-token" role="tabpanel" aria-labelledby="nav-token-tab">
                    @await Html.PartialAsync("Client/Section/Token")
                </div>
                <div class="tab-pane" id="nav-consent" role="tabpanel" aria-labelledby="nav-consent-tab">
                    @await Html.PartialAsync("Client/Section/Consent")
                </div>
                <div class="tab-pane" id="nav-deviceflow" role="tabpanel" aria-labelledby="nav-deviceflow-tab">
                    @await Html.PartialAsync("Client/Section/DeviceFlow")
                </div>
            }
        </div>
    </div>
</div>